#ifndef _BSP_TIM2_PWM_H_
#define _BSP_TIM2_PWM_H_
#include "gd32f3x0.h"

/*这里先不考虑定时器串联的情况*/
#define HEAT_PID_GPIO_PORT         GPIOA
#define HEAT_PID_GPIO_CLK          RCU_GPIOA
#define HEAT_PID_GPIO_PIN          GPIO_PIN_6
#define TIM2_CH0_AF		           GPIO_AF_1

#define HEAT_PID_TIM           		TIMER2
#define HEAT_PID_TIM_CLK       		RCU_TIMER2

#define HEAT_PID_TIM_IRQn			   TIMER2_IRQn
#define HEAT_PID_TIM_IRQHandler       TIMER2_IRQHandler

#define TIM2_PWM_PERIOD     4000      //4000其实只是2000ms

extern uint8_t pump_flag;


void TIM2_PWM_Configuration(void);
void SetPWMPulseWidth(uint32_t dat);


#endif